﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Yes.Application;
using Yes.Application.Comment;
using Yes.Application.Comment.Dto;

namespace Yes.Web.Blog.Areas.Admin.Controllers
{
    [Area("Admin")]
    public class CommentController : BaseController
    {
        private ICommentService _commentService;

        public CommentController(ICommentService commentService)
        {
            _commentService = commentService;
        }

        public ActionResult Index()
        {
            return View();
        }

      

        [HttpPost]
        public ActionResult Update(List<int> ids,string action)
        {
            return Json(_commentService.Update(ids, action));
        }


        public ActionResult GetPageInfo(CommentPagerDto dto)
        {
            return Json(new ResultDto
            {
                Status = true,
                Data = _commentService.GetPageInfo(dto)
            });
        }
    }
}